package com.welike.shibo.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.welike.shibo.service.LogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.welike.shibo.eneity.Log;
import com.welike.shibo.mapper.LogMapper;

import java.util.List;

/**
 * Created by fangyu on 2019-08-24.
 */
@Service
public class LogServiceImpl extends ServiceImpl<LogMapper, Log> implements LogService {

    @Autowired
    private LogMapper logMapper;

    /**
     * 分页查询日志
     * @param page
     * @param pageSize
     * @return
     */
    @Override
    public IPage<Log> queryByAll(Integer page, Integer pageSize) {
        Page<Log> p = new Page<>(page, pageSize);
        return logMapper.queryByAll(p);
    }
}
